<template>
    <div class="ReturnTop" id="toTop">
        <span class="glyphicon glyphicon-chevron-up" id="ReturnTop"></span><br/>
        <i>顶部</i>
    </div>
</template>

<script>
    export default {
        name: "ReturnTop",
        mounted(){
            var myScroll = new IScroll(outside);
            myScroll.on('scrollEnd', function () {
            });
            outside.addEventListener("touchmove",function (evt) {
                var e=evt||window.event;
                e.preventDefault();
            })
            toTop.addEventListener("click",function(){
                myScroll.scrollToElement(swiper, 1000)
            })

        }
    }
</script>
<style scoped>
    .ReturnTop {
        border: 1px solid gainsboro;
        border-radius: 50%;
        width: 1rem;
        height: 1rem;
        position: fixed;
        right: 0.27rem;
        top: 12rem;
        text-align: center;
        background-color:rgba(255,255,255, 0.7)
    }
    #ReturnTop{
        line-height: 0.5rem;
        color: gray;
        font-size: 14px;
    }
    i{
       font-style: normal;
       font-size: 12px;
        position: relative;
        top: -0.1rem;
    }
</style>